home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / eiffel / smalleif.97 / se.t / SmallEiffel / lib_test / test_real_ref.e < prev    next >
Encoding:
Text File  |  1996-05-02  |  766 b   |  43 lines

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_REAL_REF
  5.  
  6. creation {ANY}
  7.    make
  8.    
  9. feature {ANY}
  10.    
  11.    make is
  12.       local
  13.      r: REAL;
  14.      rr: REAL_REF;
  15.      a: ANY;
  16.       do
  17.      
  18.      rr := 2.3;
  19.      is_true(rr.item <= 2.31);
  20.      is_true(rr.item >= 2.29);
  21.      a := 2.3;
  22.      is_true(equal(a,rr));
  23.      is_true(equal(rr,2.3));
  24.      is_true(equal(a,2.3));
  25.      is_true(equal(1.5,1.5));
  26.       end;
  27.    
  28.    is_true(b: BOOLEAN) is
  29.       do
  30.      cpt := cpt + 1;
  31.      if not b then
  32.         std_output.put_string("TEST_REAL: ERROR Test # ");
  33.         std_output.put_integer(cpt);
  34.         std_output.put_string("%N");
  35.      else
  36.         -- std_output.put_string("Yes%N");
  37.      end;
  38.       end;
  39.    
  40.    cpt: INTEGER;
  41.    
  42. end -- TEST_REAL_REF
  43.